//////#include<iostream>
//////using namespace std;
//////int da[1010][1010];
//////void diff(int x1, int y1, int x2, int y2, int r)
//////{
//////    da[x1][y1] += r;
//////    da[x2 + 1][y1] -= r;
//////    da[x1][y2 + 1] -= r;
//////    da[x2 + 1][y2 + 1] += r;
//////}
//////int main()
//////{
//////    int n, m;
//////    cin >> n >> m;
//////    int p = 0;
//////    cin >> p;
//////    int x1, y1, x2, y2;
//////    while (p--)
//////    {
//////        cin >> x1 >> y1 >> x2 >> y2;
//////        diff(x1, y1, x2, y2, 1);
//////    }
//////    int w = 0;
//////    for (int i = 1; i <= n; i++)
//////    {
//////        for (int j = 1; j <= m; j++)
//////        {
//////            da[i][j] += da[i - 1][j] + da[i][j - 1] - da[i - 1][j - 1];
//////            if (da[i][j] == 0)
//////            {
//////                w++;
//////            }
//////        }
//////    }
//////    cout << w;
//////    return 0;
//////}
////
////
////
////
////#include<iostream>
////using namespace std;
////int da[1010][1010];
////void diff(int x1, int y1, int x2, int y2, int r)
////{
////    da[x1][y1] += r;
////    da[x2 + 1][y1] -= r;
////    da[x1][y2 + 1] -= r;
////    da[x2 + 1][y2 + 1] += r;
////}
////int main()
////{
////    int n, m;
////    cin >> n >> m;
////    int p = 0;
////    cin >> p;
////    int x1, y1, x2, y2;
////    while (p--)
////    {
////        cin >> x1 >> y1 >> x2 >> y2;
////        diff(x1, y1, x2, y2, 1);
////    }
////    int w = 0;
////    for (int i = 1; i <= n; i++)
////    {
////        for (int j = 1; j <= m; j++)
////        {
////            da[i][j] += da[i - 1][j] + da[i][j - 1] - da[i - 1][j - 1];
////            if (da[i][j] == 0)
////            {
////                w++;
////            }
////        }
////    }
////    cout << w;
////    return 0;
////}
//
//
//
//#include <iostream>
//using namespace std;
//const int N = 10010;
//bool st[N];
//int primes[N], k;
//
//void prime(int n) {
//	for (int i = 2; i <= n; i++) {
//		if (!st[i])
//			primes[k++] = i;
//		for (int j = 0; primes[j] < n / i; j++) {
//			st[primes[j] * i] = true;
//			if (i % primes[j] == 0)
//				break;
//		}
//	}
//}
//
//int main() {
//	int n;
//	cin >> n;
//	cout << "derahgaerhgerqag";
//	prime(n);
//	cout << "regads";
//	return 0;
//}



